package com.collect.common.eventbus.support;

/**
 * @Author hky
 * @Description
 * @Date 2021/1/18
 */
public class EventBusTemplate {

    private EventBusSupport eventBusSupport;

    public EventBusTemplate(EventBusSupport eventBusSupport) {
        this.eventBusSupport = eventBusSupport;
    }

    public void post(Object event){
        eventBusSupport.post(event);
    }

    public void asyncPost(Object event){
        eventBusSupport.asyncPost(event);
    }

    public void register(Object listener){
        eventBusSupport.register(listener);
    }
    public void asyncRegister(Object listener){
        eventBusSupport.register(listener);
    }
    public void unregister(Object listener){
        eventBusSupport.unregister(listener);
    }
    public void asyncUnRegister(Object listener){
        eventBusSupport.unregister(listener);
    }
}
